package coroutines.thread

import java.text.SimpleDateFormat
import java.util.*

class CoroutineThread1000Test {
}

fun main() {
    val df = SimpleDateFormat("yyyy-MM-dd HH:mm:ss:mmm") //设置日期格式

    for (i in 0 until 1000) {
        Thread {
            Thread.sleep(500L)
            run { println("${df.format(Date())} I'm sleeping $i ..., , ${Thread.currentThread().name}") }
        }.start()
    }

    Thread.sleep(100000)
}